package com.xuanyang.dormrepair.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @AUTHOR soft
 * @DATE 2019/5/19 1:52
 * @DESCRIBE
 */
public class PageKit {

    public static <T> IPage<T> of(int page, int limit) {
        if (page <= 0) page = 1;
        if (limit <= 0) limit = 10;
        return new Page<T>(page, limit);
    }
}
